cmake_minimum_required(VERSION 3.5)

project(main)

set(CMAKE_BUILD_TYPE Debug)

set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -g")

set(TARGET main)

aux_source_directory(. SRC_CUR) #把当前目录的源文件设置为变量SRC_CUR
aux_source_directory(src SRC_SUB)

add_executable(${TARGET} ${SRC_CUR} ${SRC_SUB})

target_compile_options(${TARGET} PRIVATE -Wall ${CPPFLAGS})

